$(function () {
    $.ajax({
        url:"/myspringboot/suppliser/findAllDQL",
        data:"",
        type:"post",
        dataType:"json",
        success:function(result){
            var result = result.data;
            var opts = "";
            for (var i = 0; i < result.length; i++) {
                var dqlId = result[i].dqlId;
                var dqlName = result[i].dqlName;
                var opt = '<option value="'+dqlId+'">'+dqlName+'</option>';
                opts += opt;
            }
            $(".c").append(opts);
        }
    })



    //查询所有药品类别
    $.ajax({
        url:"/myspringboot/DrugCategoryController/fandAllDrugCategory",
        data:"",
        type:"post",
        dataType:"json",
        success:function(result){
            var result = result.data;
            var opts = "";
            for (var i = 0; i < result.length; i++) {
                var dcId = result[i].dcId;
                var dcName = result[i].dcName;
                var opt = '<option value="'+dcId+'">'+dcName+'</option>';
                opts += opt;
            }
            $(".b").append(opts);
        }
    })


    $.ajax({
        url:"/myspringboot/ManufacturerController/fandAll",
        data:"",
        type:"post",
        dataType:"json",
        success:function(result){
            var result = result.data;
            var opts = "";
            for (var i = 0; i < result.length; i++) {
                var mfId = result[i].mfId;
                var mfName = result[i].mfName;
                var opt = '<option value="'+mfId+'">'+mfName+'</option>';
                opts += opt;
            }
            $(".d").append(opts);
        }
    })
})